<?php
require_once("../config.php"); 
require_once("../model/DB.php");
require_once("../model/Daliy.php");

if($_POST['kid']){
	if(Daliy::addDaliy($_POST['kid'],$_POST['class_id'],$_POST['status'],$_POST['lunch'],$_POST['siesta'],$_POST['perform'],$_POST['date'])){
		echo "saved";
	}
}
elseif($_POST['id']){
	if(Daliy::editDaliy($_POST['id'],$_POST['status'],$_POST['lunch'],$_POST['siesta'],$_POST['perform'])){
		echo "edited";
	}
}